package com.clarte.role.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.clarte.common.dao.BaseDao;
import com.clarte.model.Role;
@Service("roleService")
@Transactional
public class RoleServiceImpl implements RoleService {
	@Resource(name="baseDao")
	private BaseDao<Role, Integer> baseDao;
	@Override
	public void add(Role role) {
		baseDao.save(role);
	}

	@Override
	public Role get(int id) {
		return baseDao.get(id);
	}

	@Override
	public void del(Integer... id) {
		baseDao.delete(id);
	}

	@Override
	public void eidt(Role role) {
		baseDao.update(role);
	}

	@Override
	public List<Role> findAll() {
		return baseDao.findAll();
	}

}
